﻿
namespace Store.WP7.ViewModels
{
    public class ViewModelLocator
    {
        private static MainPageViewModel _mainPageViewModel;
        public static MainPageViewModel MainPageViewModel
        {
            get
            {
                if (_mainPageViewModel == null)
                    _mainPageViewModel = new MainPageViewModel();

                return _mainPageViewModel;
            }
        }

        private static ProductsViewModel _ProductsViewModel;
        public static ProductsViewModel ProductsViewModel
        {
            get
            {
                if (_ProductsViewModel == null)
                    _ProductsViewModel = new ProductsViewModel();

                return _ProductsViewModel;
            }
        }


        private static OrdersViewModel _OrdersViewModel;
        public static OrdersViewModel OrdersViewModel
        {
            get
            {
                if (_OrdersViewModel == null)
                    _OrdersViewModel = new OrdersViewModel();

                return _OrdersViewModel;
            }
        }


        private static CheckOutViewModel _CheckoutViewModel;
        public static CheckOutViewModel CheckoutViewModel
        {
            get
            {
                //if (_CheckoutViewModel == null)
                //    _CheckoutViewModel = new CheckOutViewModel();

                //return _CheckoutViewModel;
                return new CheckOutViewModel();
            }
        }


        public static OrderDetailsPageViewModel OrderDetailsPageViewModel
        {
            get { return new OrderDetailsPageViewModel(); }
        }


        public static ProductDetailsViewModel ProductDetailsViewModel
        {
            get { return new ProductDetailsViewModel(); }
        }


        public static SettingsViewModel SettingsViewModel
        {
            get { return new SettingsViewModel(); }
        }
    }
}
